package com.wmh.baseservice.skd.mapper;

import com.wmh.baseservice.skd.pojo.SkdBankCard;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
* @author CH
* @description 针对表【skd_bank_card】的数据库操作Mapper
* @createDate 2024-01-23 11:09:15
* @Entity com.wmh.baseservice.skd.pojo.SkdBankCard
*/
public interface SkdBankCardMapper extends BaseMapper<SkdBankCard> {

    @Select("SELECT cardholder, bank_card_number, bank_of_deposit, account_opening_branch, phone_number, status " +
            "FROM skd_bank_card WHERE user_id = #{usId} AND deleted = 0")
    SkdBankCard getByUserId(Long usId);

    @Select("SELECT id FROM skd_bank_card WHERE cardholder = #{cardholder} AND bank_card_number = #{bankCardNumber} AND deleted = 0")
    Long getBankCardIdByCardholderAndBankCardNumber(String cardholder, String bankCardNumber);
}




